﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VisionCore
{
   public class ProcedureHelper_EQ
    {
        public static void LoadSysParam()
        {
            ParameterHelper.SysParam = ParameterHelper.mSysDAL.Load();
        }

        public static void SaveSysParam()
        {
            ParameterHelper.mSysDAL.Save(ParameterHelper.SysParam);
        }

        public static void LoadRecParam(string device)
        {
            ParameterHelper.CurParam  = ParameterHelper.mRecDAL.Load(device);
        }

        public static void SaveRecParam()
        {
            ParameterHelper.mRecDAL.Save(ParameterHelper.CurParam, ParameterHelper.CurParam.PRM_Name);
        }

        public static AlarmHelper Alarms = new AlarmHelper();
        public static WarningHelper Warnings = new WarningHelper();

        public static bool Alarm = false;
        public static bool Warning = false;

        public static bool ManualMode = false;
        /// <summary>
        /// 自动运转中
        /// </summary>
        public static bool AutoMode = false;
        public static bool InitMode = false;
        public static bool PauseMode = false;
        public static bool DryRunMode = false;
        public static bool StepStop = false;
        public static bool InPutStop = false;
        public static bool InspHomeComp = false;
        public static bool ExcHomeComp = false;
        public static bool EfemHomeComp = false;
        public static bool TrayPortHomeComp = false;
        public static bool HomeComp = false;
        public static bool EQ_Empty => ProcedureHelper_Exc.CV1_Empty && ProcedureHelper_Exc.CV2_Empty && ProcedureHelper_Exc.Insp1_Empty && ProcedureHelper_Exc.Insp2_Empty && ProcedureHelper_Exc.Insp3_Empty && ProcedureHelper_Exc.Insp4_Empty;
        public static bool EQWhole_Empty = false;
        public static bool EQFrame_Empty = false;
        public static bool SortLoop = false;
        public static bool Insp1_Pass = false;
        public static bool Insp2_Pass = false;
        public static bool Insp3_Pass = false;
        public static bool Insp4_Pass = false;
        //public static bool CodeRead_1_Pass = false;
        //public static bool CodeRead_2_Pass = false;




        /// <summary>
        /// 视觉PC自动运转中
        /// </summary>
        public static bool VisionAutoMode = false;

        public static bool ToAutoRun = false;
        public static bool ToInit = false;
        public static bool ToManual = false;
        public static bool ToForceStop = false;
        public static bool ToDryRun = false;
        public static bool AllAxisStop = false;

        public static bool ToAutoRun_BT = false;
        public static bool ToAuto_BT = false;
        public static bool ToInit_BT = false;
        public static bool ToManual_BT = false;
        public static bool ToStop_BT = false;
        public static bool ToDryRun_BT = false;
        public static bool ToStop_BT_ForceStop = false;

        public static bool AutoRun_BL = false;
        public static bool Stop_BL = false;
        public static bool Manual_BL = false;
        public static bool Init_BL = false;
        public static bool ToDryRun_BL = false;

        public static bool SemiAuto = false;
        public static bool SingleAuto = false;
        public static bool AutoNext = false;

        public static bool ExchangeStart = false;

        public static bool ALGPass_Frame = false;

        public static bool EQ_Reset = false;
        public static bool StopBuzzer = false;

        public static bool Door_ToLock = false;
        public static bool Door_ToUnlock = false;
        public static bool Light_Open = false;

        public static bool Door_Lock =false;

        public static bool Ion_Open = false;

        public static bool RecGridRefresh = false;
        public static bool SysGridRefresh = false;

        public static bool NoGraphicMode = false;

        public static bool IonAlarmPass = false;

        public static bool LihgtControlPass = true;
    }
}
